<!DOCTYPE html>
<!--[if IE 8]> <html lang="zh-CN" class="ie8"> <![endif]-->
<html lang="zh-CN">

	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8" />
		<title>订单详情</title>
		<meta content="telephone=no,email=no,address=no" name="format-detection" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<meta name="msapplication-tap-highlight" content="no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="wap-font-scale" content="no">
		<meta name="Keywords" content="" />
		<meta name="Description" content="" />
		<link rel="stylesheet" href="/themes/wnsc_moblie/newMobile/User/css/common.css" />
		<link rel="stylesheet" href="/themes/wnsc_moblie/newMobile/User/css/user.css" />
		<link rel="stylesheet" href="/themes/wnsc_moblie/newMobile/User/css/color-style.css" />
		<link rel="stylesheet" type="text/css" href="/themes/wnsc_moblie/Public/css/public.css">

		<script type="text/javascript" src="/themes/wnsc_moblie/newMobile/User/js/area/jquery.min.js"></script>
		<script type="text/javascript" src="/themes/wnsc_moblie/Public/js/common.js"></script>
		<script src="/themes/wnsc_moblie/newMobile/Shop/js/layer.js"></script>
		<style type="text/css">
		.express_goods{line-height: 23px;padding: 7px;font-size: 12px;color: #666;}
		.head{position: inherit;height: auto;}
		.cf-tab-item a{width: 19%;}
		.cf-container .cf-tab-item.select a{color: #707070;border-bottom: 2px solid rgb(245, 183, 8);}
		.express_info{width: 100%;min-height: 100px;background: #fff;padding: 20px 0;overflow: auto;}
		.express_info ul{width: 92%;margin: 0 4%;border-left: 1px solid #CCCCCC;}
		.express_info ul li{width: 96%;margin-left: 15px;border-bottom: 1px solid #eee;position: relative;}
		.express_info ul li:last-child{border-bottom: none;}
		.express_info ul li .Traces,.express_info ul li .AcceptTime{min-height: 30px;vertical-align: middle;color: #999999;}
		.express_info ul li .Traces{font-size: 14px;}
		.express_info ul li .AcceptTime{font-size: 12px;line-height: 30px;}
		.express_info ul li .Dot{width: 8px;height: 8px;border-radius: 50%;background: #CCCCCC;position: absolute;z-index: 5;left: -20px;top: 41%;}
		.express_info ul li:first-child .Dot{background: #39C267;top: 0;width: 12px;height: 12px;border: 2px solid #A1EEC2;left: -21px;}
		.express_info ul li:first-child .Traces,.express_info ul li:first-child .AcceptTime{color: #39C267;}
		.express_title{height: 40px;line-height: 40px;background: #fff;border-bottom: 1px solid #ddd;margin-top: 10px;color: #666;font-size: 14px;padding-left: 10px;}
		.tuanStatus1{margin-top: 0;}
		.itemMode{background-color: #fff;margin-top: 10px;padding: 10px;}
		.groupCountdown{display: none;margin: 10px 0;vertical-align: middle;}
		.groupCountdown>.counter{width: 300px;height: 17px;text-align: center;color: #27272f;margin: 0 auto;color: #666;font-size: 12px;}
		.groupCountdown>.counter .time{background: #333;color: #fff;padding: 0 3px;border-radius: 5px;}
		.centerRemind p{width: 100%;height: 20px;line-height: 20px;text-align: center;color: #333;font-size: 18px;}
		.centerRemind{margin: 10px 0;}
		.centerRemind>p .num1{color: #e60044;}
		.centerRemind p.downTxt{color: #E60044;font-size: 12px;margin-top: 10px;}
		.tuanBox{position: relative;border-bottom: 1px solid #f6f6f6;}
		.itemMode{background-color: #fff;margin-top: 10px;padding: 10px;}
		.groupUserimg{text-align: center;min-height: 65px;}
		.groupUserimg .userImg{width: 45px;height: 45px;margin: 10px 20px;display: inline-block;background: #fff;border-radius: 99px;position: relative;text-align: center;}
		.groupUserimg .userImg img{width: 45px;height: 45px;border-radius: 99px;}
		.centerRemind{margin: 10px 0;}
		.btn-gotuan, .btn-goindex, .btn-inviteFriends, .btn-newtuan, .btn-cantuan{height: 39px;line-height: 39px;background-color: #E60044;border-radius: 5px;text-align: center;font-size: 15px;color: #fff;}
		.code-bg { width: 100%; height: 100%; position: absolute; left: 0; top: 0; background: rgba(0,0,0,.7); z-index: 1000; display: none;}
		.code-mask { width: 320px; height: 370px; position: fixed; left: 50%; top: 50%; margin-top: -185px; margin-left: -160px; z-index: 1000; display: none;}
		.code-mask .code-box { background: url(/themes/wnsc_moblie/newMobile/Shop/images/qr-code-bg.png) no-repeat; width: 320px; height: 370px; background-size: 320px 370px; position: relative;}
		.code-box .code-close { background: url(/themes/wnsc_moblie/newMobile/Shop/images/qr-code-close.png) no-repeat; width: 18px; height: 18px; background-size: 18px 18px; position: absolute; top: 5px; right: 5px; cursor: pointer;}
		.code-box .code-logo{ width: 200px; height: 40px; position: absolute; top: 20px; left: 50%; margin-left: -100px; text-align: center; overflow: hidden;}
		.code-box .code-logo img { max-width: 100%; max-height: 100%; }
		.code-box .code-img { width: 100px; height: 100px; position: absolute; top: 78px; left: 50%; margin-left: -50px; text-align: center;}
		.code-box .code-img img { width: 100px; height: 100px; border: 2px solid #fff;}
		.code-box h3 { position: absolute; top: 193px;  font-size: 14px; color: #fff; width: 100%; text-align: center; font-weight: normal;}
		.code-box .code-footer { overflow: hidden; width: 100%; height: 100px; background: #fff; position: absolute; left: 0; bottom: 0;}
		.code-box .code-footer img { width: 80px; height: 80px; margin-left: 10px; margin-top: 15px; float: left;}
		.code-box .code-footer-fr { float: left; width: 210px; margin-top: 10px; margin-left: 10px;}
		.code-box .code-footer-fr p { color: #222; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 20px; height: 40px; overflow: hidden;}
		.code-box .code-footer-fr span { color: #bfbfbf;font-size: 11px;display: block;margin-top: 4px;line-height: 18px;}
		.code-box .share_url{position: absolute; top: 243px; width: 100%; text-align: center;}
		.code-box .share_url input{border:none;width: 100%;background: #ed324e;color: #fff;text-align: center;}
		#nativeShare {font-size: 13px;position: fixed;top: 0; z-index: 99999; background: #fff; width: 100%; height: 100%; padding: 15px;}
		#close_share{float: right; width: 20px; margin-right: 7%; border: 1px solid #9e9e9e;text-align: center; border-radius: 20px; height: 20px; line-height: 17px;}
		#cover{display:none;position:fixed;left:0;top:0;z-index:18888;background-color:#000000;opacity:0.7;width: 100%;height: 100%;}
		#guide{display:none;position:fixed;right:18px;top:5px;z-index:19999;}
		#guide img{width:260px;height:180px;}
		</style>
			
		<script src="/themes/wnsc_moblie/Public/js/plusShare.js" type="text/javascript" charset="utf-8"></script>
		
	</head>

	<body>
	<?php
				$agent = $_SERVER['HTTP_USER_AGENT'];
				if(strpos($agent,"Html5Plus") === false){
			?>
		<header>
			<php>
				if($order_info['tuanselect']==1){ 
					if($order_info['tuan_is_first_id']==0){ 
						$num=get_tuan($order_info['order_id']); 
					}else{ 
						$num=get_tuan($order_info['tuan_is_first_id']); 
					} 
				}
			</php>
			<div class="tab_nav">
				<div class="header">
					<div class="header-left">
						<a class="sb-back" href="javascript:history.back(-1)" title="返回"></a>
					</div>
					<div class="header-middle">订单详情</div>
					<div class="header-right">
						<aside class="show-menu-btn">
							<div class="show-menu" id="show_more">
								<a href="javascript:;"></a>
							</div>
						</aside>
					</div>
				</div>
			</div>
		</header>
		<mtc_include file="Public:right_nav" />
	<?php
			}
			?>
		<div class="order-info-box">
			<!-- 拼团详情 -->
			<php>if($order_info['tuanselect']==1&&$num<$order_info['tuannum']&&$order_info['refund_state']==0&&$order_info['order_state']=='20'){</php>
			<div class="tuanStatus1 itemMode">
				<section class="groupCountdown" style="display: -webkit-box;">
					<div class="counter">
						<span class="time h">00</span>
						<span class="dot">:</span>
						<span class="time m">00</span>
						<span class="dot">:</span>
						<span class="time s">00</span>
					</div>
				</section>
				<section class="centerRemind">
					<p>还差<span class="num1">{$order_info['tuannum']-$num}</span>人，快去邀请好友参团吧</p>
					<p class="downTxt">倒计时结束前不满人数，将拼团失败并退款至余额</p>
				</section>
				
				<div class="btn-inviteFriends" id="invite_time">邀请好友</div>
			</div>
			<php>}</php>
			<div class="order-info-detail">
				<h3>
					<i class="iconfont">&#xe612;</i>
					交易状态
				</h3>
				
				<div class="order-state color">
					<php>if($order_info['refund_state']=='0'){</php>
						<php>if($order_info['order_state']=='0'){</php>
						订单已取消
						<php>}</php>
						<php>if($order_info['order_state']=='10'){</php>
						商品已拍下，等待买家付款
						<php>}</php>
						<php>if($order_info['order_state']=='20'){</php>
							<php>if($order_info['tuanselect']==1&&$num<$order_info['tuannum']){</php>
								商品已付款，拼团中
							<php>}elseif($order_info['tuanselect']==1&&$num==$order_info['tuannum']){</php>
								拼团成功,等待卖家发货
							<php>}else{</php>
								商品已付款，等待卖家发货
							<php>}</php>
						<php>}</php>
						<php>if($order_info['order_state']=='30'){</php>
						商品已发货，等待买家收货
						<php>}</php>
						<php>if($order_info['order_state']=='40'&&$order_info['evaluation_state']=='0'){</php>
						买家已收货，待评价
						<php>}</php>
					<php>}else{</php>
						<php>if($order_info['refund_state']=='1'){</php>
						退款中
						<php>}</php>
						<php>if($order_info['refund_state']=='2'){</php>
						同意退款/货
						<php>}</php>
						<php>if($order_info['refund_state']=='3'){</php>
						商家拒绝
						<php>}</php>
						<php>if($order_info['refund_state']=='4'){</php>
						等待财务待打款
						<php>}</php>
						<php>if($order_info['refund_state']=='5'){</php>
						退款/货完成
						<php>}</php>
					<php>}</php>
				</div>
			</div>
			<!-- 待付款 -->
              <php>if($order_info['refund_state']=='3'){</php>
                <div class="order-info-detail" style="font-size: 12px;padding: 2px 11px;line-height: 22px;color: red;font-weight: 800;">
                如果卖家没有解决你的上述问题，你可以在确认收货后的15天内发起售后维权，要求客服介入处理。400-870-3150 周一至周五(9:00-22:00)
                </div>
              <php>}</php>
			<php>if($order_info['order_state']>='30'){</php>
			<div class="order-info-detail" id="wuliu">
				<h3>
						<i class="iconfont">&#xe624;</i>
						{$order_info['shipping_name']}
					</h3>
				<div class="order-state color">
					{$order_info['shipping_code']}
					<i class="iconfont" style="color: #000;">&#xe607;</i>
				</div>
			</div>
			<php>}</php>
			
			<!-- 收货地址 -->
			<php>
				$ProvinceInfo=getProvinceInfo($order_info['buyer_province']); $CityInfo=getCityInfo($order_info['buyer_city']); $DistrictInfo=getDistrictInfo($order_info['buyer_district']);
			</php>
			<div class="order-info-detail">
				<dl>
					<dt>
						<span>{$order_info['buyer_name']}</span>
						<span>{$order_info['buyer_mobile']}</span>
					</dt>
					<dd>
						<i class="iconfont">&#xe613;</i>{$ProvinceInfo['province_name']} {$CityInfo['city_name']} {$DistrictInfo['district_name']} {$order_info['buyer_address']}
					</dd>
				</dl>
			</div>
			<div class="address-footer-bg"></div>
			
			
			<!--订单中商品-->
			<div class="order-item">
				<h2>订单商品</h2>

				<div class="order-good-list">
					<foreach name="order_goods_info" item="vo">

						<div style="position: relative;margin-top: 3px;" onclick='location="{:U('shop/index',array('id'=>$vo['goods_id']))}"'>
							<div class="goods-pic" style="top: 0;left: 0;">
								<img src="{$vo['goods_image']}">
							</div>
							<dl class="goods-info">
								<dt class="goods-name">{$vo['goods_name']}</dt>
								<dd class="goods-attr">
									<notempty name="vo.goods_sku_spec"><span>规格：{$vo.goods_sku_spec}</span></notempty>&nbsp;
									<notempty name="vo.goods_sku_style"><span>颜色：{$vo.goods_sku_style}</span></notempty>
								</dd>
								<dd class="goods-price price-color">
									<em>￥{$vo.goods_price}</em>
									<span class="goods-num">x{$vo.goods_num}</span>
								</dd>
							</dl>
						</div>
						<php>
							$count_fee=$count_fee+$vo['freight']; $count_price=$count_price+($vo['goods_price']*$vo['goods_num']); 
						</php>
					</foreach>
				</div>

			</div>
			
			
			
			<!--支付方式和配送方式-->
			<div class="order-info-detail m-t-10">
				<h3>支付方式</h3>
				<div class="order-way">{$order_info['payment_code']|default='未支付'}</div>
			</div>

			<div class="goods-subtotle">
				<h2>商品总额</h2>
				<div class="goods-order-pic">
					<em class="price-color">￥{$count_price}</em>
				</div>
				<if condition="$count_fee gt 0">
					<dl>
						<dt>运费</dt>
						<dd>
							<em>+￥{$count_fee}</em>
						</dd>
					</dl>
				</if>
				<if condition="$youhui_price gt 0">
					<dl>
						<dt>优惠券</dt>
						<dd>
							<em>-￥{$youhui_price}</em>
						</dd>
					</dl>
				</if>
				<if condition="$order_info['daiyan_sale'] gt 0">
					<dl>
						<dt>抵扣券</dt>
						<dd>
							<em>-￥{$order_info['daiyan_sale']|default='0.00'}</em>
						</dd>
					</dl>
				</if>
				<div class="order-reality-pic">

					<p class="clearfix">
						<span class="order-text">订单总金额</span>
						<span class="order-pic price-color">
							<php>
								$zong_price=$count_price-$youhui_price-$order_info['daiyan_sale']+$count_fee;
								if($zong_price<0){
									$zong_price=0.00;
								}
							</php>
							<em>￥{$zong_price}</em>
						</span>
					</p>

				</div>

			</div>

			<div class="order-info-detail nav-content">
				<ul>
					<li>
						<span>订单编号：</span>
						<span>{$order_num}</span>
					</li>

					<li>
						<span>下单时间：</span>
						<span>{:date('Y-m-d H:i:s',$order_info['add_time'])}</span>
					</li>
                     <notempty	name="order_info['payment_time']">
                  	<li>
						<span>支付时间：</span>
						<span>{:date('Y-m-d H:i:s',$order_info['payment_time'])}</span>
					</li>
                   </notempty>
              	   <notempty name="order_info['shipping_time']">
                  <li>
						<span>发货时间：</span>
						<span>{:date('Y-m-d H:i:s',$order_info['shipping_time'])}</span>
					</li>
                   </notempty>
                  <notempty	name="order_info['finnshed_time']">
                   <li>
						<span>收货时间：</span>
						<span>{:date('Y-m-d H:i:s',$order_info['finnshed_time'])}</span>
					</li>
                    </notempty>
						<input type="hidden" value="{:date('Y-m-d H:i:s',$tuan_pay_time)}" id="create_time" />
					<input type="hidden" value="86400" id="buy_close_time" />
				</ul>
			</div>
		</div>
		<!-- 操作按钮 -->
		<div style="height: 54px; line-height: 54px" class="handle-spacing"></div>
		<div class="detail-dowm order-handle">
			<php>if($order_info['refund_state']=='0'){</php>
				<php>if($order_info['order_state']=='0'){</php>
				<div class="operate">
					<a class="btn-link edit-order btn">订单已取消</a>
				</div>
				<php>}</php>
				<php>if($order_info['order_state']=='10'){</php>
				<!-- 取消订单 -->
				<div class="operate">
					<a class="btn-link edit-order btn" data-id="{$order_num}" data-type="close_order">取消订单</a>
				</div>
				<div class="operate">
					<a href="{:U('pay/paychoose',array('order_cn'=>$order_num))}" class="on-payment btn cur">立即付款</a>
				</div>
				<php>}</php>
				<php>if($order_info['order_state']=='20'){</php>
					<php>if($order_info['tuanselect']==1&&$num<$order_info['tuannum']){</php>
						<div class="operate">
							<a href="javascript:;" class="on-payment btn cur">商品已付款，拼团中</a>	
						</div>
					<php>}elseif($order_info['tuanselect']==1&&$num==$order_info['tuannum']){</php>
						<div class="operate">
							<a href="javascript:;" class="on-payment btn cur">拼团成功,等待卖家发货</a>
						</div>
					<php>}else{</php>
						<div class="operate">
							<a href="javascript:;" class="on-payment btn cur">等待发货</a>
						</div>
					<php>}</php>
				<php>}</php>
				<php>if($order_info['order_state']=='30'){</php>
				<div class="operate">
					<a class="btn-link edit-order btn" data-id="{$order_info['order_id']}" data-type="queren_get">确认收货</a>
				</div>
				<php>}</php>
				<php>if($order_info['order_state']=='40'&&$order_info['evaluation_state']=='0'){</php>
				<div class="operate">
					<a class="btn-link edit-order btn edit-order" data-id="{$order_info['order_id']}" data-type="evaluation">立即评价</a>
				</div>
				<php>}</php>
			<php>}else{</php>
				<php>if($order_info['refund_state']=='1'){</php>
					<div class="operate">
						<a href="javascript:;" class="on-payment btn cur">退款中</a>
					</div>
				<php>}</php>
				<php>if($order_info['refund_state']=='2'){</php>
				<div class="operate">
						<a href="javascript:;" class="on-payment btn cur">同意退款/货</a>
					</div>
				<php>}</php>
				<php>if($order_info['refund_state']=='3'){</php>
				<div class="operate">
						<a href="javascript:;" class="on-payment btn cur">商家拒绝</a>
					</div>
				<php>}</php>
				<php>if($order_info['refund_state']=='4'){</php>
				<div class="operate">
						<a href="javascript:;" class="on-payment btn cur">等待财务待打款</a>
					</div>
				<php>}</php>
				<php>if($order_info['refund_state']=='5'){</php>
				<div class="operate">
						<a href="javascript:;" class="on-payment btn cur">退款/货完成</a>
					</div>
				<php>}</php>
			<php>}</php>

		</div>
		<div id="nativeShare" style="display: none;"></div>
	<div class="code-bg" style="display: none;"></div>
	<div class="code-mask" style="display: none;">
		<div class="code-box">
			<div class="code-close" onclick="close_code_coupon();"></div>
			<div class="code-logo">
				<img src="/themes/wnsc_moblie/newMobile/Shop/images/mall_logo_0.png">
			</div>
			<div class="code-img">
				<div id="qrcode">
					<img src="http://{$_SERVER['HTTP_HOST']}/index/qrcode?url=http://{$_SERVER['HTTP_HOST']}{:U('shop/ctuan',array('id'=>$order_info['order_id']))}">
				</div>
			</div>
			<h3>截屏保存二维码到手机，分享给好友<br/>或长按复制下方链接，去粘贴给好友吧：</h3>
			<span class="share_url">
				<input type="text"   readonly="readonly" value="http://{$_SERVER['HTTP_HOST']}{:U('shop/ctuan',array('id'=>$order_info['order_id']))}" />
			</span>
			<div class="code-footer">
				<img src="{$order_goods_info.0.goods_image}">
				<div class="code-footer-fr">
					<p>【仅剩{$order_info['tuannum']-$num}个名额】我{$order_goods_info.0.goods_price}元拼了{$order_goods_info.0.goods_name}</p>
					<span>好货好价好服务，一起实惠一起拼，手慢无哟</span>
				</div>
			</div>
		</div>
	</div>
	<script src="/themes/wnsc_moblie/newMobile/Shop/css/nativeShare.js"></script>
	<script type="text/javascript"  src="https://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
    <link rel="stylesheet" href="/themes/wnsc_moblie/newMobile/Shop/css/nativeShare.css"/>
		<script type="text/javascript">
			var order_id = "{$order_info['order_id']}";
			$(function() {
				
				$('body').on('touchstart', '.edit-order', function() {
					var type = $(this).attr('data-type');
					var order_cn = $(this).attr('data-id');
					//关闭订单
					if(type == 'close_order') {
						var statu = confirm("是否确认取消订单?");
						if(!statu) {
							return false;
						}
						$.ajax({
							type: 'POST',
							url: '{:U("user/close_order")}',
							data: {
								order_cn: order_cn
							},
							success: function(msg) {
								if(msg.code == 1) {
									layer.msg(msg.message);
									setTimeout(location.reload(), 3000)
								} else {
									layer.msg(msg.message);
								}
							},
							error: function() {
								layer.msg('网络故障!');
							}
						});
					}
					//确认订单
					if(type == 'queren_get') {
						var statu = confirm("是否确认收货?");
						if(!statu) {
							return false;
						}
						$.ajax({
							type: "post",
							url: '{:U("user/confirm_order")}',
							data: {
								order_id: order_id
							},
							success: function(data) {
								if(data.code == 1) {
									layer.msg(data.message)
									setTimeout('window.location.href="/user/order/status/4.html"', 1000);
								}
								if(data.code == 0) {
									layer.msg(data.message)
								}
							}
						});

					}
					//立即评价
					if(type == 'evaluation') {
						window.location.href = '/user/reviewcommodity/id/' + order_id + '.html';
					}
				});
			})
		</script>

		<script type="text/javascript">
			<php>
				$isweixin=is_weixin();
				if($isweixin){
			</php>
				var isweixin=1;
			<php>}else{</php>
				var isweixin=0;
			<php>}</php>
			$(function() {
				//设置时间倒计时
				
				countdown();
				interval = setInterval("countdown()", 1000);
				var g_url = "http://{$_SERVER['HTTP_HOST']}{:U('shop/ctuan',array('id'=>$order_info['order_id']))}";
		        var config = {
		            url:g_url,
		            title:"【仅剩{$order_info['tuannum']-$num}个名额】我{$order_goods_info.0.goods_price}元拼了{$order_goods_info.0.goods_name}",
		            desc:'好货好价好服务，一起实惠一起拼，手慢无哟',
		            img:"http://{$_SERVER['SERVER_NAME']}{$order_goods_info.0.goods_image}",
		            img_title:"{$web_name}",
		            from:'58代言'
		        };
		        var share_obj = new nativeShare('nativeShare',config);
				
				$('#close_share').click(function(){
					$('#nativeShare').hide();
				})
				$('.close').click(function(){
					$('.wuliuinfo').hide();
				})
				$('#invite_time').click(function(){
                  if(isweixin==1){
                    $('#cover').show();
                    $('#guide').show();
                  }else{
                    if(navigator.userAgent.indexOf("Html5Plus") > -1){
                      myshare();
                    }else{
                      var UA = navigator.appVersion;
                      var isqqBrowser = (UA.split("MQQBrowser/").length > 1) ? 1: 0;
                      var isucBrowser = (UA.split("UCBrowser/").length > 1) ? 1 : 0;
                      if(isqqBrowser || isucBrowser){
                          $('#nativeShare').show();
                      }else {
						  $(".code-bg").show();
                          $('.code-mask').show();
                          $("body").addClass("visibly");

                      }
                    
                    }
                  }
					
				})
				$('#cover').click(function(){
					$('#cover').hide();
					$('#guide').hide();
					
				})
				$('body').on('click','.nativeShare',function(){
					$('#nativeShare').hide();
				})
				$('#wuliu').click(function() {
					var height = $(window).height();
					height = height - 200;
					$('.express_info').css('height', height)
					$('.wuliuinfo').show();
					var wuliuinfo = $('#js-express-info').html();

					if(wuliuinfo == '') {
						$.ajax({
							type: "post",
							url: "/user/get_orderlogistics.html",
							data: {
								"order_id": order_id
							},
							beforeSend: function() {
								html = '<div class="silider-express" style="padding: 77px;">';
								html += '<div class="mask-layer-loading" style="text-align:center;">';
								html += '<img src="/Store/css/order/mask_load.gif"/>';
								html += '<div style="text-align:center;margin-top:10px;">努力加载中...</div>';
								html += '</div>';
								html += '</div>';
								$('#js-express-info').html(html);

							},
							success: function(data) {
								var data = eval('(' + data + ')');
								var traces = data.Traces;
								if(traces.length > 0) {
									var newhtml = '';
									for(var i = 0; i < traces.length; i++) {
										var html = '';
										if(i == traces.length - 1) {
											html += '<li id="js-express-info">';
											html += '	<div class="Traces">' + traces[i]['AcceptStation'] + '</div>';
											html += '	<div class="AcceptTime">' + traces[i]['AcceptTime'] + '</div>';
											html += '	<div class="Dot"></div>';
											html += '</li>';
										} else {
											html += '<li>';
											html += '	<div class="Traces">' + traces[i]['AcceptStation'] + '</div>';
											html += '	<div class="AcceptTime">' + traces[i]['AcceptTime'] + '</div>';
											html += '	<div class="Dot"></div>';
											html += '</li>';
										}

										newhtml = html + newhtml;
									}

								} else {
									var newhtml = '';
									newhtml = '<div class="silider-express" style="padding: 77px;">';
									newhtml += '<div class="mask-layer-loading" style="text-align:center;">';
									newhtml += '<div style="text-align:center;margin-top:10px;">没有物流信息...</div>';
									newhtml += '</div>';
									newhtml += '</div>';
								}
								$('#js-express-info').html(newhtml);
							}
						});
					}

				})
			})
			var interval = null;
			var fw_date='{:date("Y-m-d H:i:s", time())}';
			var flag=true;
			function countdown() {
				var date = new Date($("#create_time").val().replace(/\-/g, "\/")); //订单创建时间
				var buy_close_time = parseFloat($("#buy_close_time").val()) * 60 * 1000; //订单关闭时间
				var timestamp2 = new Date(fw_date.replace(/\-/g, "\/"));; //当前时间
				var timestamp2 = timestamp2.getTime();
				var timestamp2 = timestamp2 / 1000+1;
				fw_date=new Date(parseInt(timestamp2) * 1000).Format("yyyy-MM-dd hh:mm:ss");
				var date_now = new Date(fw_date.replace(/\-/g, "\/"));; //当前时间
				var end_time = date.getTime() + buy_close_time; //结束时间毫秒数
				var lag = (end_time - date_now.getTime()) / 1000; //当前时间和结束时间之间的秒数
				if(lag > 0) {
					var hour = Math.floor((lag / 3600) % 24);
					var minute = Math.floor((lag / 60) % 60);
					var second = Math.floor(lag % 60);
					if(hour == 0 && second == 0 && minute == 0) {
						clearInterval(interval);
					}
					if(second < 10) {
						second = "0" + second;
					}
					if(minute < 10) {
						minute = "0" + minute;
					}
					if(hour < 10) {
						hour = "0" + hour;
					}
					$('.h').text(hour);
					$('.m').text(minute);
					$('.s').text(second);
					//$(".j_orderTime").text(hour + ":" + minute + ":" + second);
				}
			}
			Date.prototype.Format = function (fmt) { //author: meizz   
		        var o = {  
		            "M+": this.getMonth() + 1, //月份   
		            "d+": this.getDate(), //日   
		            "h+": this.getHours(), //小时   
		            "m+": this.getMinutes(), //分   
		            "s+": this.getSeconds(), //秒   
		            "q+": Math.floor((this.getMonth() + 3) / 3), //季度   
		            "S": this.getMilliseconds() //毫秒   
		        };  
		        if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));  
		        for (var k in o)  
		        if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));  
		        return fmt;  
		    } 
		    function close_code_coupon() {
				$(".code-bg").hide();
				$('.code-mask').hide();
				$("body").removeClass("visibly");
			}
		

				</script>
		<script>
		
		 wx.config({
		      debug: false,//设置调试模式
		      appId: "{$signPackage['appId']}",  //公众号的唯一标识
		      timestamp: '{$signPackage["timestamp"]}',  //生成签名的时间戳
		      nonceStr: '{$signPackage["nonceStr"]}',   //生成签名的随机串
		      signature: '{$signPackage["signature"]}',  //签名
		      jsApiList: [         
		         'onMenuShareTimeline',
		         'onMenuShareAppMessage',
		         'onMenuShareWeibo',
		         'onMenuShareQQ',
		         'onMenuShareQZone',
		         'hideMenuItems',
		         'showMenuItems'      
		         ]   
		    })
		
		var link = "http://{$_SERVER['HTTP_HOST']}{:U('shop/ctuan',array('id'=>$order_info['order_id']))}";
		var title="【仅剩{$order_info['tuannum']-$num}个名额】我{$order_goods_info.0.goods_price}元拼了{$order_goods_info.0.goods_name}";
		var	desc='好货好价好服务，一起实惠一起拼，手慢无哟';
		var	imgUrl="http://{$_SERVER['SERVER_NAME']}{$order_goods_info.0.goods_image}";
		   wx.ready(function(){
		      wx.onMenuShareTimeline({
		         title: title,
		         link: link,
		         imgUrl: imgUrl,
		         trigger: function (res) {
		 
		         },
		         success: function (res) {
		            layer.msg('分享成功');  
		            $('#cover').hide();
					$('#guide').hide();
					again_tip();
		         },
		         cancel: function (res) {
		         	 layer.msg('您已取消分享');
		         	 $('#cover').hide();
					$('#guide').hide();
		                
		         }
		      });
		 
		      wx.onMenuShareAppMessage({
		         title: title,
		         desc: desc,
		         link: link,
		         imgUrl: imgUrl,
		         success: function (res) {
		            layer.msg('分享成功'); 
		            $('#cover').hide();
					$('#guide').hide();
					again_tip();
		            },
		         cancel: function (res) {
		            layer.msg('您已取消分享');
		            $('#cover').hide();
					$('#guide').hide();
		            }
		      });
		 
		      wx.onMenuShareWeibo({
		         title: title,
		         desc: desc,
		         link: link,
		         imgUrl: imgUrl,
		         success: function () {
		           layer.msg('分享成功'); 
		           $('#cover').hide();
					$('#guide').hide();
					again_tip();
		            },
		         cancel: function () {
		           layer.msg('您已取消分享'); 
		           $('#cover').hide();
					$('#guide').hide();
		            }
		      });
		 
		      wx.onMenuShareQQ({
		         title: title,
		         desc: desc,
		         link: link,
		         imgUrl: imgUrl,
		         success: function () {
		            layer.msg('分享成功'); 
		            $('#cover').hide();
					$('#guide').hide();
					again_tip();
		          },
		         cancel: function () {
		           layer.msg('您已取消分享');
		            $('#cover').hide();
					$('#guide').hide();
		         }
		      });
		   });
		 	function again_tip(){
		 		layer.confirm('邀请更多好友可提高拼团成功率！', {
				  btn: ['进一步邀请','再去逛逛'] //按钮
				}, function(){
				  	$('#cover').show();
					$('#guide').show();
					layer.closeAll();
				}, function(){
				   window.location.href='/';
				});
		 	}
		</script>
	
		<div id="cover"></div>
		<div id="guide"><img src="/themes/wnsc_moblie/newMobile/User/images/guide1.png"></div>
		
		<div class="wuliuinfo" style="display: none;position: fixed; top: 50px; z-index: 99;width: 100%;background: #fff;">
			<div class="express_title">物流跟踪 <i class="iconfont close" style="float: right;margin-right: 5px;">&#xe621;</i> </div>
			<div class="express_info">
				<ul id="js-express-info"></ul>
			</div>
		</div>
		<script>
			function myshare(){
			
				 if(navigator.userAgent.indexOf("Html5Plus") > -1) {
					//5+ 原生分享
					window.plusShare({
						title: "【仅剩{$order_info['tuannum']-$num}个名额】我{$order_goods_info.0.goods_price}元拼了{$order_goods_info.0.goods_name}",//应用名字
						content: '好货好价好服务，一起实惠一起拼，手慢无哟',
						href:"http://{$_SERVER['HTTP_HOST']}{:U('shop/ctuan',array('id'=>$order_info['order_id']))}",//分享出去后，点击跳转地址
						thumbs: ["http://{$_SERVER['SERVER_NAME']}{$order_goods_info.0.goods_image}"] //分享缩略图
					}, function(result) {
						//分享回调
					});
				}
			}
		</script>
		
	</body>

</html>